<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        class person{
            constructor(name,age){
                this.name1=name;
                this.age=age;
            }
            static gender="男";
            static say=()=>{
                console.log("我爱你，塞北的雪");
                
            }
        }
        let obj=new person("张三",18)
        //非静态属性
        console.log(obj.name,obj.age);//只能对象调用
        console.log(person.name1,person.age);//类不能调用
        //静态属性可以类调用不能用对象调用
        console.log(obj.gender);
        console.log(person.gender);
        

        
    </script>
</body>
</html>